<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								业务类型：<select name="orderType" th:with="type=${@dict.getType('pay_order_type')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								内部单号：<input type="text" name="innerOrderId"/>
							</li>

							<li>
								外部单号：<input type="text" name="outOrderId"/>
							</li>

							<li>
								用户：<input type="text" name="userId"/>
							</li>

							<li>
								用户类型：<select name="userType" th:with="type=${@dict.getType('pay_order_user_type')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								订单号：<input type="text" name="orderNo"/>
							</li>

							<li>
								出入类型：<select name="inOut" th:with="type=${@dict.getType('pay_order_in_out')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								客户：<input type="text" name="client"/>
							</li>

							<li>
								入金状态：<select name="inState" th:with="type=${@dict.getType('pay_order_in_state')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								入金方式：<select name="inType" th:with="type=${@dict.getType('pay_order_in_type')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								出金状态：<select name="outState" th:with="type=${@dict.getType('pay_order_out_state')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								出金方式：<select name="outType" th:with="type=${@dict.getType('pay_order_out_type')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								出金类型：<select name="orderMethod" th:with="type=${@dict.getType('pay_order_method')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								支付方式：<select name="payType" th:with="type=${@dict.getType('pay_type')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								商户：<input type="text" name="aerchantId"/>
							</li>

							<li>
								商户姓名：<input type="text" name="aerchantName"/>
							</li>

							<li>
								承兑商：<input type="text" name="acceptId"/>
							</li>

							<li>
								代理：<input type="text" name="agentId"/>
							</li>

							<li>
								代理姓名：<input type="text" name="agentName"/>
							</li>

							<li>
								承兑商姓名：<input type="text" name="acceptName"/>
							</li>

							<li>
								承兑商账号：<input type="text" name="acceptAccont"/>
							</li>

							<li>
								收款姓名：<input type="text" name="receiveUser"/>
							</li>

							<li>
								开户银行：<input type="text" name="receiveBank"/>
							</li>

							<li>
								银行卡号：<input type="text" name="receiveCard"/>
							</li>

							<li>
								钱包地址：<input type="text" name="receiveAdress"/>
							</li>

							<li>
								备注：<input type="text" name="receiveRemark"/>
							</li>

							<li>
								处理时长：<input type="text" name="handleTime"/>
							</li>

							<li>
								是否付款：<select name="isPay" th:with="type=${@dict.getType('pay_yes_no')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								是否收款：<select name="isConform" th:with="type=${@dict.getType('pay_yes_no')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								创建者：<input type="text" name="createBy"/>
							</li>

							<li>
								更新者：<input type="text" name="updateBy"/>
							</li>

							<li class="select-time">
								<label>付款时间： </label>
								<input type="text" class="time-input" id="startPayTime" placeholder="开始" name="params[beginPayTime]"/>
								<span>-</span>
								<input type="text" class="time-input" id="endPayTime" placeholder="结束" name="params[endPayTime]"/>
							</li>
							<li class="select-time">
								<label>收款时间： </label>
								<input type="text" class="time-input" id="startPayConformTime" placeholder="开始" name="params[beginPayConformTime]"/>
								<span>-</span>
								<input type="text" class="time-input" id="endPayConformTime" placeholder="结束" name="params[endPayConformTime]"/>
							</li>
							<li class="select-time">
								<label>超时时间： </label>
								<input type="text" class="time-input" id="startPayTimeoutTime" placeholder="开始" name="params[beginPayTimeoutTime]"/>
								<span>-</span>
								<input type="text" class="time-input" id="endPayTimeoutTime" placeholder="结束" name="params[endPayTimeoutTime]"/>
							</li>
							<li class="select-time">
								<label>创建时间： </label>
								<input type="text" class="time-input" id="startCreateTime" placeholder="开始" name="params[beginCreateTime]"/>
								<span>-</span>
								<input type="text" class="time-input" id="endCreateTime" placeholder="结束" name="params[endCreateTime]"/>
							</li>
							<li class="select-time">
								<label>更新时间： </label>
								<input type="text" class="time-input" id="startUpdateTime" placeholder="开始" name="params[beginUpdateTime]"/>
								<span>-</span>
								<input type="text" class="time-input" id="endUpdateTime" placeholder="结束" name="params[endUpdateTime]"/>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
				<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="pay:order:add">
					<i class="fa fa-plus"></i> 添加
				</a>
				<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="pay:order:edit">
					<i class="fa fa-edit"></i> 修改
				</a>
				<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="pay:order:remove">
					<i class="fa fa-remove"></i> 删除
				</a>
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="pay:order:export">
						<i class="fa fa-download"></i> 导出
				 </a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('pay:order:edit')}]];
        var removeFlag = [[${@permission.hasPermi('pay:order:remove')}]];
        var prefix = ctx + "pay/order";
        var orderInOutDir = [[${@dict.getType('pay_order_type')}]];
        var orderUserTypeDir = [[${@dict.getType('pay_order_user_type')}]];
        var orderInOutDir = [[${@dict.getType('pay_order_in_out')}]];
        var orderInStateDir = [[${@dict.getType('pay_order_in_state')}]];
        var orderInTypeDir = [[${@dict.getType('pay_order_in_type')}]];
        var orderOutStateDir = [[${@dict.getType('pay_order_out_state')}]];
        var orderOutTypeDir = [[${@dict.getType('pay_order_out_type')}]];
        var orderMethodDir = [[${@dict.getType('pay_order_method')}]];
        var payTypeDir = [[${@dict.getType('pay_type')}]];
        var orderPayStateDir = [[${@dict.getType('pay_yes_no')}]];
        var orderConformStateDir = [[${@dict.getType('pay_yes_no')}]];

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "订单",
				search: false,
		        showExport: true,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'id', 
					title : '',
					visible: false
				},
				{
					field : 'orderType', 
					title : '业务类型',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderInOutDir, value);
		            }
				},
				{
					field : 'innerOrderId', 
					title : '内部单号',
					sortable: true
				},
				{
					field : 'outOrderId', 
					title : '外部单号',
					sortable: true
				},
				{
					field : 'userId', 
					title : '用户',
					sortable: true
				},
				{
					field : 'userType', 
					title : '用户类型',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderUserTypeDir, value);
		            }
				},
				{
					field : 'orderNo', 
					title : '订单号',
					sortable: true
				},
				{
					field : 'inOut', 
					title : '出入类型',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderInOutDir, value);
		            }
				},
				{
					field : 'client', 
					title : '客户',
					sortable: true
				},
				{
					field : 'inState', 
					title : '入金状态',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderInStateDir, value);
		            }
				},
				{
					field : 'inType', 
					title : '入金方式',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderInTypeDir, value);
		            }
				},
				{
					field : 'outState', 
					title : '出金状态',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderOutStateDir, value);
		            }
				},
				{
					field : 'outType', 
					title : '出金方式',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderOutTypeDir, value);
		            }
				},
				{
					field : 'orderMethod', 
					title : '出金类型',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderMethodDir, value);
		            }
				},
				{
					field : 'payType', 
					title : '支付方式',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(payTypeDir, value);
		            }
				},
				{
					field : 'aerchantId', 
					title : '商户',
					sortable: true
				},
				{
					field : 'aerchantName', 
					title : '商户姓名',
					sortable: true
				},
				{
					field : 'acceptId', 
					title : '承兑商',
					sortable: true
				},
				{
					field : 'agentId', 
					title : '代理',
					sortable: true
				},
				{
					field : 'agentName', 
					title : '代理姓名',
					sortable: true
				},
				{
					field : 'acceptName', 
					title : '承兑商姓名',
					sortable: true
				},
				{
					field : 'acceptAccont', 
					title : '承兑商账号',
					sortable: true
				},
				{
					field : 'receiveUser', 
					title : '收款姓名',
					sortable: true
				},
				{
					field : 'receiveBank', 
					title : '开户银行',
					sortable: true
				},
				{
					field : 'receiveCard', 
					title : '银行卡号',
					sortable: true
				},
				{
					field : 'receiveAdress', 
					title : '钱包地址',
					sortable: true
				},
				{
					field : 'receiveRemark', 
					title : '备注',
					sortable: true
				},
				{
					field : 'handleTime', 
					title : '处理时长',
					sortable: true
				},
				{
					field : 'isPay', 
					title : '是否付款',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderPayStateDir, value);
		            }
				},
				{
					field : 'isConform', 
					title : '是否收款',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderConformStateDir, value);
		            }
				},
				{
					field : 'createBy', 
					title : '创建者',
					sortable: true
				},
				{
					field : 'updateBy', 
					title : '更新者',
					sortable: true
				},
				{
					field : 'payTime', 
					title : '付款时间',
					sortable: true
				},
				{
					field : 'payConformTime', 
					title : '收款时间',
					sortable: true
				},
				{
					field : 'payTimeoutTime', 
					title : '超时时间',
					sortable: true
				},
				{
					field : 'createTime', 
					title : '创建时间',
					sortable: true
				},
				{
					field : 'updateTime', 
					title : '更新时间',
					sortable: true
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>